<!DOCTYPE html>
<html>
<head>
    <meta name="layout" content="main"/>
    <g:set var="entityName" value="${message(code: 'estate.label', default: 'estate')}"/>
    <title>压力分析</title>
    <asset:stylesheet src="newMap/gisMap.css"/>
    <style>
    .selectContentTop{
        margin-top: 17px;
        position: absolute;
        left: 50%;
        margin-left: -300px;
    }
    .selectContent1{
        width: 100px;
        float: left;
        padding: 10px 0;
        padding-left: 12px;
        cursor: pointer;
        color: #679B43;
    }
    .selectContent1 a{
        color: #679B43!important;
    }
    .selectContent1:hover{
        background: #F3F7EF;
    }
    .col-xs-12{
        margin: 10px 0;
    }
    .table>tbody>tr>td, .table>tbody>tr>th, .table>tfoot>tr>td, .table>tfoot>tr>th, .table>thead>tr>td{
        border: 1px solid #ddd;
    }
    #table2>thead>tr>th,#table2>tbody>tr>td, #table2>tbody>tr>th, #table2>tfoot>tr>td, #table2>tfoot>tr>th, #table2>thead>tr>td{
        border: none;
    }
    .analyaceStyle section{
        margin-top: 10px;
        margin-left: 20px;
    }
    .analyaceStyle h5{
        margin: 10px 0 5px 0!important;
    }
    .aaa{
        margin-right: 4px;
    }
    .bbb{
        position: absolute;
        right:40px;
        bottom: 10px;
    }
    </style>
</head>

<body class="fixed-navbar fixed-sidebar">
%{--头部--}%
<div id="bankHeader">
    <div class="bankHeaderLeft pull-left">
        <asset:image src="banking7.png" style="display: block; float: left;width: 38px;"/>
        <div class="logoFont">押品预警系统</div>
        <div style="position: absolute;top: 60px;left: 26px;font-weight: bold;">广东</div>
        <div class="province">
            <asset:image src="banking9.png" style="display: block;float: left;"/>
            <div class="">广东 <span style="position: relative;top: 5px;left: 3px">ˇ</span></div>
        </div>
    </div>

    <div class="selectContentTop">
        <div class="selectContent1">
            <asset:image src="banking25.png" class="tabImage"/>
            <div class="tabFont1"><g:link controller="newMap" action="gisMap">地图</g:link></div>
        </div>
        <div class="selectContent1">
            <asset:image src="banking21.png" class="tabImage"/>
            <div class="tabFont1"><g:link controller="bankingRegulatory" action="index">图表</g:link></div>
        </div>
        <div class="selectContent1">
            <asset:image src="banking27.png" class="tabImage"/>
            <div class="tabFont1"><g:link controller="bankingRegulatory" action="monitor">监测</g:link></div>
        </div>
        <div class="selectContent1">
            <asset:image src="banking23.png" class="tabImage"/>
            <div class="tabFont1"><g:link controller="bankingRegulatory" action="riskWarning">预警</g:link></div>
        </div>
        <div class="selectContent1">
            <asset:image src="banking26.png" class="tabImage"/>
            <div class="tabFont1"><g:link controller="bankingRegulatory" action="report">报告</g:link></div>
        </div>
        %{--<div class="selectContent">--}%
        %{--<asset:image src="banking22.png" class="tabImage"/>--}%
        %{--<div class="tabFont1"><g:link controller="bankingRegulatory" action="developer">开发商</g:link></div>--}%
        %{--</div>--}%
        <div class="selectContent1">
            <asset:image src="banking28.png" class="tabImage"/>
            <div class="tabFont1">用户</div>
        </div>
        <div class="selectContent1">
            <asset:image src="banking24.png" class="tabImage"/>
            <div class="tabFont1">机构</div>
        </div>
    </div>
    <div class="bankHeaderRight pull-right">
        <div class="userInfo">
            <span style="position: relative;top: 4px;">
                <i class="pe-7s-clock"></i>&nbsp;&nbsp;2018-10-18 09:32:55 <span style="margin: 0 15px;">管理员</span>
            </span>
            <div class="quit">退出</div>
        </div>
    </div>
</div>
<div class="small-header">
    <div class="hpanel">
        <div class="panel-body">
            <div id="hbreadcrumb" class="pull-right navFloatRight">
                <ol class="hbreadcrumb breadcrumb">
                    <li>CINDATA PLS</li>
                    <li class="active">
                        <span>压力分析</span>
                    </li>
                </ol>
            </div>

            <h2 class="font-light m-b-xs">
                压力分析
            </h2>
        </div>
    </div>
</div>

<div class="content animate-panel">
    <div class="row">
        <div class="form-horizontal">
            <div class="hpanel hgreen">
                <div class="panel-heading">
                    <div class="panel-tools">
                        <button class="btn btn-default btn-xs" type="">
                            压力测试
                        </button>
                    </div>
                    &nbsp;
                </div>
                <div class="panel-body seach-group">
                    <div class="row">
                        <div class="form-group col-sm-3">
                            <label class="col-sm-3 control-label">城市</label>
                            <div class="col-sm-9 input-group" style="display: flex;justify-content: center">
                                <select class="form-control" name="">
                                    <option value="">请选择城市</option>
                                    <option value="">广州市</option>
                                </select>
                            </div>
                        </div>
                        <div class="form-group col-sm-3">
                            <label class="col-sm-3 control-label">房价</label>
                            <div class="col-sm-9 input-group" style="display: flex;justify-content: center">
                                <select class="form-control" name="">
                                <option value="">请选择房价</option>
                                <option value="">3000元以下</option>
                                <option value="">3000-6000元</option>
                                <option value="">6000-10000元</option>
                                <option value="">10000元以上</option>
                                </select>
                            </div>
                        </div>
                        <div class="form-group col-sm-3">
                            <label class="col-sm-3 control-label">利率</label>
                            <div class="col-sm-9 input-group" style="display: flex;justify-content: center">
                                <select class="form-control" name="">
                                    <option value="">请选择利率</option>
                                    <option value="">5%</option>
                                    <option value="">10%</option>
                                    <option value="">15%</option>
                                    <option value="">20%</option>
                                </select>
                            </div>
                        </div>
                        <div class="form-group col-sm-3">
                            <label class="col-sm-3 control-label">人均月收入</label>
                            <div class="col-sm-9 input-group" style="display: flex;justify-content: center">
                                <select class="form-control" name="">
                                    <option value="">请选择人均月收入</option>
                                    <option value="">5000元以下</option>
                                    <option value="">5000-10000元</option>
                                    <option value="">10000-20000元</option>
                                    <option value="">20000元以上</option>
                                </select>
                            </div>
                        </div>
                    </div>
                    <div class="row">

                        <div class="content animate-panel p-b-n">
                            <div class="row">
                                <div class="col-xs-7 p-n">
                                    <label class="control-label" style="padding-left: 10px;">广州市各区县涨跌趋势</label>
                                    <div class="col-md-12">
                                        <div id="myMap1"></div>
                                        <div class="bbb">
                                            <button class="btn btn-success btn-xs pull-left aaa" type="">
                                                住宅价格
                                            </button>
                                            <button class="btn btn-success btn-xs pull-left aaa" type="">
                                                动态抵押率
                                            </button>
                                            <button class="btn btn-success btn-xs pull-left aaa" type="">
                                                偿债收入比
                                            </button>
                                            <button class="btn btn-success btn-xs pull-left aaa" type="">
                                                违约率
                                            </button>
                                        </div>
                                    </div>
                                </div>
                                <div class="col-xs-5 p-n">
                                    <label class="control-label">广州市各区县涨跌</label>
                                    %{--不动产压力分析--}%
                                    <div class="table-responsive" style="display: none;">
                                        <table class="table text-left" id="table1">
                                            <thead>
                                            <tr>
                                                <td>TOP10</td>
                                                <td>区域</td>
                                                <td>均价(元/m2)</td>
                                                <td>降幅</td>
                                            </tr>
                                            </thead>

                                        </table>
                                    </div>
                                    <div class="table-responsive">
                                        <table class="table text-left" id="table2">
                                            <thead>
                                            <tr>
                                                <td>城市</td>
                                                <td>均价(元/㎡)</td>
                                                <td>降幅</td>
                                                <td>利率</td>
                                                <td>动态抵押率</td>
                                                <td>债偿收入比</td>
                                            </tr>
                                            </thead>
                                            <tbody>
                                                <tr>
                                                    <td>白云区</td>
                                                    <td>16300元</td>
                                                    <td>8%</td>
                                                    <td>20%</td>
                                                    <td>8.5%</td>
                                                    <td>50%</td>
                                                </tr>
                                            <tr>
                                                <td>越秀区</td>
                                                <td>15000元</td>
                                                <td>8%</td>
                                                <td>20%</td>
                                                <td>8.5%</td>
                                                <td>50%</td>
                                            </tr>
                                            <tr>
                                                <td>荔湾区</td>
                                                <td>16300元</td>
                                                <td>8%</td>
                                                <td>20%</td>
                                                <td>8.5%</td>
                                                <td>50%</td>
                                            </tr>
                                            <tr>
                                                <td>天河区</td>
                                                <td>13050元</td>
                                                <td>8%</td>
                                                <td>20%</td>
                                                <td>8.5%</td>
                                                <td>50%</td>
                                            </tr>
                                            <tr>
                                                <td>黄埔区</td>
                                                <td>12200元</td>
                                                <td>8%</td>
                                                <td>20%</td>
                                                <td>8.5%</td>
                                                <td>50%</td>
                                            </tr>
                                            <tr>
                                                <td>海珠区</td>
                                                <td>11000元</td>
                                                <td>8%</td>
                                                <td>20%</td>
                                                <td>8.5%</td>
                                                <td>50%</td>
                                            </tr>
                                            <tr>
                                                <td>花都区</td>
                                                <td>9190元</td>
                                                <td>8%</td>
                                                <td>20%</td>
                                                <td>8.5%</td>
                                                <td>50%</td>
                                            </tr>
                                            <tr><td>南沙区</td>
                                                <td>8900元</td>
                                                <td>8%</td>
                                                <td>20%</td>
                                                <td>8.5%</td>
                                                <td>50%</td></tr>
                                            <tr>
                                                <td>番禺区</td>
                                                <td>8600元</td>
                                                <td>8%</td>
                                                <td>20%</td>
                                                <td>8.5%</td>
                                                <td>50%</td>
                                            </tr>
                                            <tr>
                                                <td>增城区</td>
                                                <td>7600元</td>
                                                <td>8%</td>
                                                <td>20%</td>
                                                <td>8.5%</td>
                                                <td>50%</td>
                                            </tr>
                                            <tr>
                                                <td>从化区</td>
                                                <td>6700元</td>
                                                <td>8%</td>
                                                <td>20%</td>
                                                <td>8.5%</td>
                                                <td>50%</td>
                                            </tr>
                                            </tbody>
                                        </table>
                                    </div>
                                </div>

                            </div>
                        </div>


                    </div>
                </div>
            </div>

        </div>
    </div>
    <div class="row">
        <div class="hpanel hgreen">
            <div class="panel-heading">
                <div class="panel-tools"></div>
                压力测试结果
            </div>
            <div class="panel-body">
                <div class="col-md-4">
                    <div id="prodNumber_1" style="width: 100%;height: 400px;"></div>
                </div>
                <div class="col-md-4">
                    <div id="prodNumber_2" style="width: 100%;height: 400px;"></div>
                </div>
                <div class="col-md-4">
                    <div id="main_6" style="width: 100%;height: 400px;"></div>
                </div>
            </div>
        </div>
    </div>

    <div class="row">
        <div class="hpanel hgreen">
            <div class="panel-heading">
                <div class="panel-tools"></div>
                压力测试报告
            </div>
            <div class="panel-body analyaceStyle">
                <div class="content">
                    <h5>压力测试报告</h5>
                <section>分析时间；2018年10月16日</section>
                    <section>分析范围：基于<span class="text-danger">5,120,000</span>笔押品自动生成，总贷款金额共<span class="text-danger">344,333,494,200</span>元，贷款余额共<span class="text-danger">322,494,200</span>元，押品面积共<span class="text-danger">122,222,324</span>平方米，押品估值共<span class="text-danger">333,494,200</span>。</section>
                    <section>模拟条件：广州市房价下跌<span class="text-danger">5</span>%，利率<span class="text-danger">9.5</span>%，人均月收入为<span class="text-danger">9000元/月</span></section>
                    <section>结论：利率较以往上升了<span class="text-danger">5</span>%，人均收入较以往下降<span class="text-danger">800元/每月</span>， 预测开发商资金缺口为<span class="text-danger">8</span>亿，开发商还款期限延长<span class="text-danger">8-12</span>个月，导致银行负债率<span class="text-danger">20</span>%，违约率<span class="text-danger">40</span>%，损失率<span class="text-danger">35</span>%。</section>
                <h5>预测动态抵押率分布：</h5>
                <section>动态抵押率=当前贷款余额/当前押品价值</section>
                <h5>动态抵押率分布见下表：</h5>
                <section class="table-responsive">
                    <table  cellpadding="1" cellspacing="1" class="table table-striped table-bordered table-hover text-center" >
                        <thead>
                        <tr>
                            <td>动态抵押率（%）</td>
                            <td>押品数量</td>
                            <td>押品占比</td>
                            <td>当前押品价值总额（元）</td>
                            <td>当前押品价值占比</td>
                            <td>贷款余额总额（元）</td>
                            <td>贷款余额占比</td>
                        </tr>
                        </thead>
                        <tbody>
                        <tr>
                            <td>0-60%</td>
                            <td>432</td>
                            <td>10.67%</td>
                            <td>432,323,232</td>
                            <td>10.1%</td>
                            <td>232,233,990</td>
                            <td>18.9%</td>
                        </tr>
                        <tr>
                            <td>60%-80%</td>
                            <td>2934</td>
                            <td>20.33%</td>
                            <td>432,323,232</td>
                            <td>10.1%</td>
                            <td>232,233,990</td>
                            <td>10.1%</td>
                        </tr>
                        <tr>
                            <td>80%-100%</td>
                            <td>234322</td>
                            <td>10%</td>
                            <td>432,323,232</td>
                            <td>10.1%</td>
                            <td>232,233,990</td>
                            <td>20.9%</td>
                        </tr>
                        </tbody>
                    </table>
                </section>
                <section>此批押品中有234，322动态抵押率大于0.8，存在高违约风险，贷款余额为232,233,990元，分布于白云区，花都区，建议密切关注。</section>
                <h5>动态抵押率大于0.8的押品分布城市下表：</h5>
                <section class="table-responsive">
                    <table cellpadding="1" cellspacing="1" class="table table-striped table-bordered table-hover text-center" >
                        <thead>
                        <tr>
                            <td>城市</td>
                            <td>重估总价（元）</td>
                            <td>贷款余额（元）</td>
                            <td>押品数量</td>
                        </tr>
                        </thead>
                        <tbody>
                        <tr>
                            <td>白云区</td>
                            <td>423,323,456</td>
                            <td>323,456</td>
                            <td>134,322</td>
                        </tr>
                        <tr>
                            <td>花都区</td>
                            <td>423,323,456</td>
                            <td>323,456</td>
                            <td>100,000</td>
                        </tr>
                        </tbody>
                    </table>
                </section>
                <h5>动态抵押率大于100%的押品分布城市下表：</h5>
                <section class="table-responsive">
                    <table cellpadding="1" cellspacing="1" class="table table-striped table-bordered table-hover text-center" >
                        <thead>
                        <tr>
                            <td>城市</td>
                            <td>重估总价（元）</td>
                            <td>贷款余额（元）</td>
                            <td>押品数量</td>
                        </tr>
                        </thead>
                        <tbody>
                        <tr>
                            <td>天河区</td>
                            <td>423,323,456</td>
                            <td>323,456</td>
                            <td>134,322</td>
                        </tr>
                        <tr>
                            <td>南沙区</td>
                            <td>423,323,456</td>
                            <td>323,456</td>
                            <td>100,000</td>
                        </tr>

                        </tbody>
                    </table>
                </section>
                <h5>预测各城市违约率汇报如下：</h5>
                <section class="table-responsive">
                    <table cellpadding="1" cellspacing="1" class="table table-striped table-bordered table-hover text-center" >
                        <thead>
                        <tr>
                            <td>城市</td>
                            <td>违约率</td>
                            <td>预计违约金额（元）</td>
                            <td>损失率</td>
                        </tr>
                        </thead>
                        <tbody>
                        <tr>
                            <td>白云区</td>
                            <td>50%</td>
                            <td>400,000,00</td>
                            <td>30%</td>
                        </tr>
                        <tr>
                            <td>越秀区</td>
                            <td>50%</td>
                            <td>399,000,000</td>
                            <td>30%</td>
                        </tr>
                        <tr>
                            <td>荔湾区</td>
                            <td>50%</td>
                            <td>380,000,000</td>
                            <td>30%</td>
                        </tr>
                        <tr>
                            <td>天河区</td>
                            <td>50%</td>
                            <td>400,000,000</td>
                            <td>30%</td>
                        </tr>
                        </tbody>
                    </table>
                </section>
                </div>
            </div>
        </div>
    </div>
</div>

<asset:javascript src="echarts/echarts-all-3.js"/>

%{--住宅押品分布--}%
<asset:javascript src="main/bankingLoanAmountPerMonth_11.js"/>
%{--抵押率监测--}%
<asset:javascript src="main/bankingLoanAmountPerMonth_22.js"/>
%{--偿债收入比--}%
<asset:javascript src="main/bankingLoanAmountPerMonth66.js"/>
<script>

    $(function () {
        var h=document.body.clientHeight;
        $("#myMap1").css('height',0.45*h+'px')
        var cityName = '广州市';
        var cityCode = $("#city").val();
        var priceFluctuationsRatio = $("#priceFluctuationsRatio").val();
        initmap1(cityCode,cityName,priceFluctuationsRatio)

    });
    var initTable = function (allData) {
        allData.sort(function(a, b) {
            return b.standardPrice-a.standardPrice;
        });
        console.log(allData);
        var table = document.getElementById("table2");
        var tbody = document.createElement("tbody");
        var html = "";
        if(allData.length>10){
            for(var i=0;i<10;i++){
                var priceMomRatio = allData[i].priceMomRatio.toFixed(2);
                var symbol = "";
                if(priceMomRatio>=0){
                    symbol = "<span class='text-danger'>↑</span>";
                }else{
                    symbol = "<span class='text-success'>↓</span>";
                }
                html +="<tr><td>"+(i+1)+"</td><td>"+allData[i].districtName+"</td><td>"+allData[i].standardPrice+"</td><td>"+symbol+priceMomRatio+"%</td></tr>";
            }
        }else{
            for(var i=0;i<allData.length;i++){
                var priceMomRatio = allData[i].priceMomRatio.toFixed(2);
                var symbol = "";
                if(priceMomRatio>=0){
                    symbol = "<span class='text-danger'>↑</span>";
                }else{
                    symbol = "<span class='text-success'>↓</span>";
                }
                html +="<tr><td>"+(i+1)+"</td><td>"+allData[i].districtName+"</td><td>"+allData[i].standardPrice+"</td><td>"+symbol+priceMomRatio+"%</td></tr>";
            }
        }
        tbody.innerHTML=html;
        table.appendChild(tbody);
    };
    var initmap1 = function (cityCode,cityName,priceFluctuationsRatio) {
        require.config({
            paths: {
                echarts: 'https://echartsjs.com/build/dist'
            }
        });
// 使用
        require(
            [
                'echarts',
                'echarts/chart/map', // 使用柱状图就加载bar模块，按需加载
            ],
            function (ec) {
// 基于准备好的dom，初始化echarts图表
                var myMap1 = ec.init(document.getElementById('myMap1'));
                var ecConfig = require('echarts/config');
                var zrEvent = require('zrender/tool/event');
                var curIndx = 0;
                //全国省份
                var mapType = [
                    'china',
// 23个省
                    '广东', '青海', '四川', '海南', '陕西',
                    '甘肃', '云南', '湖南', '湖北', '黑龙江',
                    '贵州', '山东', '江西', '河南', '河北',
                    '山西', '安徽', '福建', '浙江', '江苏',
                    '吉林', '辽宁',
// 5个自治区
                    '新疆', '广西', '宁夏', '内蒙古', '西藏',
// 4个直辖市
                    '北京', '天津', '上海', '重庆',
// 2个特别行政区

                ];
                //全国城市
                var cityMap = {
                    "北京市": "110100",
                    "天津市": "120100",
                    "上海市": "310100",
                    "重庆市": "500100",

                    "崇明县": "310200", //
                    "湖北省直辖县市": "429000", //
                    "铜仁市": "522200", //
                    "毕节市": "522400", //

                    "石家庄市": "130100",
                    "唐山市": "130200",
                    "秦皇岛市": "130300",
                    "邯郸市": "130400",
                    "邢台市": "130500",
                    "保定市": "130600",
                    "张家口市": "130700",
                    "承德市": "130800",
                    "沧州市": "130900",
                    "廊坊市": "131000",
                    "衡水市": "131100",
                    "太原市": "140100",
                    "大同市": "140200",
                    "阳泉市": "140300",
                    "长治市": "140400",
                    "晋城市": "140500",
                    "朔州市": "140600",
                    "晋中市": "140700",
                    "运城市": "140800",
                    "忻州市": "140900",
                    "临汾市": "14100",
                    "吕梁市": "141100",
                    "呼和浩特市": "150100",
                    "包头市": "150200",
                    "乌海市": "150300",
                    "赤峰市": "150400",
                    "通辽市": "150500",
                    "鄂尔多斯市": "150600",
                    "呼伦贝尔市": "150700",
                    "巴彦淖尔市": "150800",
                    "乌兰察布市": "150900",
                    "兴安盟": "152200",
                    "锡林郭勒盟": "152500",
                    "阿拉善盟": "152900",
                    "沈阳市": "210100",
                    "大连市": "210200",
                    "鞍山市": "210300",
                    "抚顺市": "210400",
                    "本溪市": "210500",
                    "丹东市": "210600",
                    "锦州市": "210700",
                    "营口市": "210800",
                    "阜新市": "210900",
                    "辽阳市": "211000",
                    "盘锦市": "211100",
                    "铁岭市": "211200",
                    "朝阳市": "211300",
                    "葫芦岛市": "211400",
                    "长春市": "220100",
                    "吉林市": "220200",
                    "四平市": "220300",
                    "辽源市": "220400",
                    "通化市": "220500",
                    "白山市": "220600",
                    "松原市": "220700",
                    "白城市": "220800",
                    "延边朝鲜族自治州": "222400",
                    "哈尔滨市": "230100",
                    "齐齐哈尔市": "230200",
                    "鸡西市": "230300",
                    "鹤岗市": "230400",
                    "双鸭山市": "230500",
                    "大庆市": "230600",
                    "伊春市": "230700",
                    "佳木斯市": "230800",
                    "七台河市": "230900",
                    "牡丹江市": "23100",
                    "黑河市": "231100",
                    "绥化市": "231200",
                    "大兴安岭地区": "232700",
                    "南京市": "320100",
                    "无锡市": "320200",
                    "徐州市": "320300",
                    "常州市": "320400",
                    "苏州市": "320500",
                    "南通市": "320600",
                    "连云港市": "320700",
                    "淮安市": "320800",
                    "盐城市": "320900",
                    "扬州市": "321000",
                    "镇江市": "321100",
                    "泰州市": "321200",
                    "宿迁市": "321300",
                    "杭州市": "330100",
                    "宁波市": "330200",
                    "温州市": "330300",
                    "嘉兴市": "330400",
                    "湖州市": "330500",
                    "绍兴市": "330600",
                    "金华市": "330700",
                    "衢州市": "330800",
                    "舟山市": "330900",
                    "台州市": "331000",
                    "丽水市": "331100",
                    "合肥市": "340100",
                    "芜湖市": "340200",
                    "蚌埠市": "340300",
                    "淮南市": "340400",
                    "马鞍山市": "340500",
                    "淮北市": "340600",
                    "铜陵市": "340700",
                    "安庆市": "340800",
                    "黄山市": "341000",
                    "滁州市": "341100",
                    "阜阳市": "341200",
                    "宿州市": "341300",
                    "六安市": "341500",
                    "亳州市": "341600",
                    "池州市": "341700",
                    "宣城市": "341800",
                    "福州市": "350100",
                    "厦门市": "350200",
                    "莆田市": "350300",
                    "三明市": "350400",
                    "泉州市": "350500",
                    "漳州市": "350600",
                    "南平市": "350700",
                    "龙岩市": "350800",
                    "宁德市": "350900",
                    "南昌市": "360100",
                    "景德镇市": "360200",
                    "萍乡市": "360300",
                    "九江市": "360400",
                    "新余市": "360500",
                    "鹰潭市": "360600",
                    "赣州市": "360700",
                    "吉安市": "360800",
                    "宜春市": "360900",
                    "抚州市": "361000",
                    "上饶市": "361100",
                    "济南市": "370100",
                    "青岛市": "370200",
                    "淄博市": "370300",
                    "枣庄市": "370400",
                    "东营市": "370500",
                    "烟台市": "370600",
                    "潍坊市": "370700",
                    "济宁市": "370800",
                    "泰安市": "370900",
                    "威海市": "37100",
                    "日照市": "371100",
                    "莱芜市": "371200",
                    "临沂市": "371300",
                    "德州市": "371400",
                    "聊城市": "371500",
                    "滨州市": "371600",
                    "菏泽市": "371700",
                    "郑州市": "410100",
                    "开封市": "410200",
                    "洛阳市": "410300",
                    "平顶山市": "410400",
                    "安阳市": "410500",
                    "鹤壁市": "410600",
                    "新乡市": "410700",
                    "焦作市": "410800",
                    "濮阳市": "410900",
                    "许昌市": "411000",
                    "漯河市": "411100",
                    "三门峡市": "411200",
                    "南阳市": "411300",
                    "商丘市": "411400",
                    "信阳市": "411500",
                    "周口市": "411600",
                    "驻马店市": "411700",
                    "省直辖县级行政区划": "469000",
                    "武汉市": "420100",
                    "黄石市": "420200",
                    "十堰市": "420300",
                    "宜昌市": "420500",
                    "襄阳市": "420600",
                    "鄂州市": "420700",
                    "荆门市": "420800",
                    "孝感市": "420900",
                    "荆州市": "421000",
                    "黄冈市": "421100",
                    "咸宁市": "421200",
                    "随州市": "421300",
                    "恩施土家族苗族自治州": "422800",
                    "长沙市": "430100",
                    "株洲市": "430200",
                    "湘潭市": "430300",
                    "衡阳市": "430400",
                    "邵阳市": "430500",
                    "岳阳市": "430600",
                    "常德市": "430700",
                    "张家界市": "430800",
                    "益阳市": "430900",
                    "郴州市": "431000",
                    "永州市": "431100",
                    "怀化市": "431200",
                    "娄底市": "431300",
                    "湘西土家族苗族自治州": "433100",
                    "广州市": "440100",
                    "韶关市": "440200",
                    "深圳市": "440300",
                    "珠海市": "440400",
                    "汕头市": "440500",
                    "佛山市": "440600",
                    "江门市": "440700",
                    "湛江市": "440800",
                    "茂名市": "440900",
                    "肇庆市": "441200",
                    "惠州市": "441300",
                    "梅州市": "441400",
                    "汕尾市": "441500",
                    "河源市": "441600",
                    "阳江市": "441700",
                    "清远市": "441800",
                    "东莞市": "441900",
                    "中山市": "442000",
                    "潮州市": "445100",
                    "揭阳市": "445200",
                    "云浮市": "445300",
                    "南宁市": "450100",
                    "柳州市": "450200",
                    "桂林市": "450300",
                    "梧州市": "450400",
                    "北海市": "450500",
                    "防城港市": "450600",
                    "钦州市": "450700",
                    "贵港市": "450800",
                    "玉林市": "450900",
                    "百色市": "451000",
                    "贺州市": "451100",
                    "河池市": "451200",
                    "来宾市": "451300",
                    "崇左市": "451400",
                    "海口市": "460100",
                    "三亚市": "460200",
                    "三沙市": "460300",
                    "成都市": "510100",
                    "自贡市": "510300",
                    "攀枝花市": "510400",
                    "泸州市": "510500",
                    "德阳市": "510600",
                    "绵阳市": "510700",
                    "广元市": "510800",
                    "遂宁市": "510900",
                    "内江市": "511000",
                    "乐山市": "511100",
                    "南充市": "511300",
                    "眉山市": "511400",
                    "宜宾市": "511500",
                    "广安市": "511600",
                    "达州市": "511700",
                    "雅安市": "511800",
                    "巴中市": "511900",
                    "资阳市": "512000",
                    "阿坝藏族羌族自治州": "513200",
                    "甘孜藏族自治州": "513300",
                    "凉山彝族自治州": "513400",
                    "贵阳市": "520100",
                    "六盘水市": "520200",
                    "遵义市": "520300",
                    "安顺市": "520400",
                    "黔西南布依族苗族自治州": "522300",
                    "黔东南苗族侗族自治州": "522600",
                    "黔南布依族苗族自治州": "522700",
                    "昆明市": "530100",
                    "曲靖市": "530300",
                    "玉溪市": "530400",
                    "保山市": "530500",
                    "昭通市": "530600",
                    "丽江市": "530700",
                    "普洱市": "530800",
                    "临沧市": "530900",
                    "楚雄彝族自治州": "532300",
                    "红河哈尼族彝族自治州": "532500",
                    "文山壮族苗族自治州": "532600",
                    "西双版纳傣族自治州": "532800",
                    "大理白族自治州": "532900",
                    "德宏傣族景颇族自治州": "533100",
                    "怒江傈僳族自治州": "533300",
                    "迪庆藏族自治州": "533400",
                    "拉萨市": "540100",
                    "昌都地区": "542100",
                    "山南地区": "542200",
                    "日喀则地区": "542300",
                    "那曲地区": "542400",
                    "阿里地区": "542500",
                    "林芝地区": "542600",
                    "西安市": "610100",
                    "铜川市": "610200",
                    "宝鸡市": "610300",
                    "咸阳市": "610400",
                    "渭南市": "610500",
                    "延安市": "610600",
                    "汉中市": "610700",
                    "榆林市": "610800",
                    "安康市": "610900",
                    "商洛市": "61100",
                    "兰州市": "620100",
                    "嘉峪关市": "620200",
                    "金昌市": "620300",
                    "白银市": "620400",
                    "天水市": "620500",
                    "武威市": "620600",
                    "张掖市": "620700",
                    "平凉市": "620800",
                    "酒泉市": "620900",
                    "庆阳市": "62100",
                    "定西市": "621100",
                    "陇南市": "621200",
                    "临夏回族自治州": "622900",
                    "甘南藏族自治州": "623000",
                    "西宁市": "630100",
                    "海东地区": "632100",
                    "海北藏族自治州": "632200",
                    "黄南藏族自治州": "632300",
                    "海南藏族自治州": "632500",
                    "果洛藏族自治州": "632600",
                    "玉树藏族自治州": "632700",
                    "海西蒙古族藏族自治州": "632800",
                    "银川市": "640100",
                    "石嘴山市": "640200",
                    "吴忠市": "640300",
                    "固原市": "640400",
                    "中卫市": "640500",
                    "乌鲁木齐市": "650100",
                    "克拉玛依市": "650200",
                    "吐鲁番地区": "652100",
                    "哈密地区": "652200",
                    "昌吉回族自治州": "652300",
                    "博尔塔拉蒙古自治州": "652700",
                    "巴音郭楞蒙古自治州": "652800",
                    "阿克苏地区": "652900",
                    "克孜勒苏柯尔克孜自治州": "653000",
                    "喀什地区": "653100",
                    "和田地区": "653200",
                    "伊犁哈萨克自治州": "654000",
                    "塔城地区": "654200",
                    "阿勒泰地区": "654300",
                    "自治区直辖县级行政区划": "659000",
                    "台湾省": "71000",
                    "香港特别行政区": "810100",
                    "澳门特别行政区": "820000"
                };
                var mapGeoData = require('echarts/util/mapData/params');
                for (var city in cityMap) {
                    mapType.push(city);
// 自定义扩展图表类型
                    mapGeoData.params[city] = {
                        getGeoJson: (function (c) {
                            var geoJsonName = cityMap[c];
                            return function (callback) {
                                $.getJSON('/assets/main/geoJson/china-main-city/' + geoJsonName + '.json', callback);
                            }
                        })(city)
                    }
                }
                var option = {
                    title: {
                        text: '',
                        x: 'center',
                    },
                    tooltip: {
                        trigger: 'item',
                        formatter:'{b0}</br> 涨跌:  {c0}%<br />',

                    },

                    //颜色渐变
                    dataRange: {
                        min: -10,
                        max: 10,
                        x: 'left',
                        y: 'bottom',
                        text:['高','低'],           // 文本，默认为数值文本
                        calculable : true,
                        // color:['#00b6dd','#1ABCDF','#33C2E0','#4DC8E2','#67CEE3','#80D3E5','#9AD9E6','#B3DFE8','#cde5e9']
                        // color:['#006edd','#cde5e9']
                        color:['#006EE5','#B0D4F2']
                    },
                    toolbox: {
                        show: true,
                        orient: 'vertical',
                        x: 'right',
                        y: 'center',
                    },
                    series: [{
                        name: '涨跌',
                        type: 'map',
                        mapType: cityName,
                        selectedMode: 'single',
                        itemStyle: {
                            normal: {
                                color:'#dee8ee',//地图背景色
                                borderColor: '#fff',//边框颜色
                                borderWidth:'1',
                                label: {
                                    show: true,
                                    textStyle: {
                                        color: "#fff"//当前字体
                                    }
                                },
                            },
                            emphasis: {
                                color: '#ddd000',//划过北京颜色
                                label: {
                                    show: true,
                                    textStyle: {
                                        color: "#fff",//高亮字体
                                    }
                                },
                            },
                        },
                        data: []
                    },],
                    textStyle:{
                        color: 'red',
                    }
                };
                $.ajax({
                    type: "POST",
                    url: "/assessAnalyze/stressAnalyzeData",
                    data: {
                        city: cityCode,
                        priceFluctuationsRatio:priceFluctuationsRatio
                    },
                    success: function (msg) {
                        if(msg.status=="success"){
                            var dataList = msg.result.resultList;
                            var mapData = [];
                            for(var i = 0 ;i<dataList.length;i++){
                                var map = {};
                                map.name = dataList[i].districtName;
                                map.value = dataList[i].priceMomRatio.toFixed(2);
                                mapData[i] = map;
                            }
                            option.series[0].data = mapData;
                            // 为echarts对象加载数据
                            myMap1.setOption(option);
                            window.onresize = function () {
                                myMap1.resize();
                            };
                            //top10表格
                            initTable(dataList);
                        }
                    }
                });
            }
        );
    };

</script>

</body>
</html>
